package com.wjx.reservation_service.service;

import com.wjx.reservation_service.model.Rating;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface IRatingService {
    //根据服务id查询评价
    public List<Rating> queryRatingByServiceId(int serviceId);
    //根据id更新
    public int updateScoreById(int id, int score, String feedback,String lastUpdatedTime);
    //根据id删除评价
    public int deleteRatingById(int id);
    //根据id查询评价
    public Rating queryRatingById(int id);
    //根据预约id查询评价
    public Rating queryRatingByAppointmentId(int appointmentId);
    //添加评价
    public int addRating(Rating rating);
    //根据服务id删除评价
    public int deleteRatingByServiceId(int serviceId);
    //根据用户id删除评价
    public int deleteRatingByUserId(int userId);
    //根据预约id删除评价
    public int deleteRatingByAppointmentId(int appointmentId);
    //查询所有评价
    public List<Rating> queryAllRating();
    //根据关键词查询评价
    public List<Rating> queryLikeRating(String keyword);
    //根据用户id查询评价
    public List<Rating> queryRatingByUserId(int userId);
}
